package com.crm.crmback.model;

import java.util.List;

/**
 * 写成 泛型<T>,用于通用的 PageResult
 * @param <T>
 */
public class PageResult<T> {
    /*code: 0
    ,msg:
    ,count: 3000000
    ,data:*/
    private int code;//0表示成功 1表示失败
    private String msg;//错误信息
    private int count;//总记录数
    private List<T> data;//用list进行数据的封装

    @Override
    public String toString() {
        return "PageResult{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", count=" + count +
                ", data=" + data +
                '}';
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
